<?php if(!empty($subvo)){
    $v = $subvo;
    $subvo = '';
}
if(!empty($subsubvo)){
    $v = $subsubvo;
    $subsubvo = '';
}
?>

<div class="viewBox myBox<?php echo $v['id'];?>" <?php if($_SESSION[C('USER_AUTH_KEY')]){?> sortID="<?php echo $v['sort'];?>" modulesID="<?php echo $v['id'];?>" title="<?php echo $v['title'];?>" deleteUrl="<?php echo U('/Admin/Modules/delete',array('id'=>$v['id']));?>" settingUrl="<?php echo U('/Admin/Modules/edit',array('id'=>$v['id']));?>" isEdit="0"<?php }?>>
  <?php if(!empty($v['dataname'])){
                $v['content'] = $v['dataname'];
                
        }else{
            $v['content'] = unserialize($v['content']);
        }
  ?>
  <div class="panel panel-primary">
    <?php include(TMPL_PATH.'Home/TemplateDefault/Public-Moduletitle'.C('TMPL_TEMPLATE_SUFFIX')); ?>
    <div class="panel-body">
     
      <?php foreach($v['content'] as $key => $p):?>
      <div <?php if($_SESSION[C('USER_AUTH_KEY')]){?>modulesID="<?php echo $v['id'];?>"<?php }?> class="viewBoxCss media<?php if($key == 0){echo ' first';}if($key+1 == count($v['content'])){echo ' last';}?>"> <a href="<?php echo getArtLink($p['id']);?>" class="pull-left viewBoxCss" <?php if($_SESSION[C('USER_AUTH_KEY')]){?>modulesID="<?php echo $v['id'];?>"<?php }?>><img <?php if($_SESSION[C('USER_AUTH_KEY')]){?>modulesID="<?php echo $v['id'];?>"<?php }?> src="<?php echo getThumbPath($p['img_url']);?>" class="media-object viewBoxCss" alt='' /></a>
        <div class="media-body viewBoxCss" <?php if($_SESSION[C('USER_AUTH_KEY')]){?>modulesID="<?php echo $v['id'];?>"<?php }?>>
          <h4 class="media-heading viewBoxCss" <?php if($_SESSION[C('USER_AUTH_KEY')]){?>modulesID="<?php echo $v['id'];?>"<?php }?>> <a class="Atitle viewBoxCss" <?php if($_SESSION[C('USER_AUTH_KEY')]){?>modulesID="<?php echo $v['id'];?>"<?php }?> href="<?php echo getArtLink($p['id']);?>"><?php echo $p['title'];?></a> </h4>
          <?php if($v['listContentLength'] > 0){?>
          <span class="ListContent viewBoxCss" <?php if($_SESSION[C('USER_AUTH_KEY')]){?>modulesID="<?php echo $v['id'];?>"<?php }?>><?php echo cut_content($p,$v['listContentLength'], 0, $v['listContentOut']); ?></span>
          <?php }?>
        </div>
      </div>
      <?php endforeach; ?>
      
      <?php if(empty($v['content'])){?>
          <p class="emptycontent">暂无内容</p>
      <?php }?>
      <div class="clearfix"></div>
      
      <?php if($v['display_pages']>0){echo $pages;}?>
      
    </div>
  </div>
</div>
